package cn.labbook.bluetooth.entity;

import cn.labbook.bluetooth.entity.base.BaseMySqlEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TransferAmmeterRecordView implements Serializable {
    /**
     * 电表序列号
     */
    private String AmmeterId;

    /**
     * 支付记录Id
     */
    private String tenantPayId;

    /**
     * 房东手机号
     */
    private String mobile;

    /**
     * 转账时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date transferTime;

    /**
     * 转账金额
     */
    private Double amount;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 失败原因
     */
    private String failReason;

    public enum Status {

        SUCCESS(1, "转账成功"),
        FAIL(2, "转账失败");
        private final int key;
        private final String value;

        Status(int key, String value) {
            this.key = key;
            this.value = value;
        }

        public int getKey() {
            return key;
        }

        public String getValue() {
            return value;
        }
    }
}
